import http from "../utils/http"
import type { ResponseModel } from "@/common/type/ResponseModel.ts"
import type { LoginParams, LoginResult } from "@/common/type/LoginModel.ts"

/**
 * 登录固接口
 * @param data 请前往 ` @/common/type/LoginModel.ts ` 定义接口参数类型
 * @returns  返回接口数据类型 Promise<ResponseModel<any>> ` @/common/typeLoginModel.ts ` 定义接口响应数据类型
 */
export const loginApi = (data: LoginParams): Promise<ResponseModel<LoginResult>> => {
	return http.post("/api/auth", data)
}
